import request from '@/utils/request'

// 创建混合云支撑-服务端许可证根密钥
export function createHbcServerLicenseRoot(data) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/create',
    method: 'post',
    data: data
  })
}

// 更新混合云支撑-服务端许可证根密钥
export function updateHbcServerLicenseRoot(data) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/update',
    method: 'post',
    data: data
  })
}

// 删除混合云支撑-服务端许可证根密钥
export function deleteHbcServerLicenseRoot(id) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/delete?id=' + id,
    method: 'get'
  })
}

// 获得混合云支撑-服务端许可证根密钥
export function getHbcServerLicenseRoot(id) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/get?id=' + id,
    method: 'get'
  })
}

// 获得混合云支撑-服务端许可证根密钥分页
export function getHbcServerLicenseRootPage(query) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/page',
    method: 'get',
    params: query
  })
}

// 导出混合云支撑-服务端许可证根密钥 Excel
export function exportHbcServerLicenseRootExcel(query) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 创建混合云支撑-服务端许可证根密钥-测试RSA
export function testRSA(data) {
  return request({
    url: '/hbcsupport/hbc-server-license-root/test-rsa',
    method: 'post',
    data: data

  })
}

//创建混合云支撑-服务端许可证根密钥-创建RSA密钥对
export function createRSAKeypair() {
  return request({
    url: '/hbcsupport/hbc-server-license-root/create-rsa-keypair',
    method: 'get'
  })
}
